FROM ubuntu:14.04
MAINTAINER yuzhantao "yuzhantao@strong-link.cn"

RUN apt-get update -qq && apt-get install -qqy curl apt-transport-https
RUN apt-get update -qq && apt-get install -qqy iptables ca-certificates openjdk-7-jdk

ENV MQ_HOME /opt/activemq
ENV MQ_DOWNLOAD_URL http://www.apache.org/dyn/closer.cgi?filename=/activemq/5.14.4/apache-activemq-5.14.4-bin.tar.gz&action=download
ENV MQ_DOWNLOAD_PATH /activemq.tar.gz
RUN mkdir -p $MQ_HOME
#下载ActiveMQ
RUN curl -sf -o $MQ_DOWNLOAD_PATH -L $MQ_DOWNLOAD_URL
#解压ActiveMQ
RUN tar -zxvf $MQ_DOWNLOAD_PATH -C $MQ_HOME
#开放端口
EXPOSE 61616
EXPOSE 8161

#启动ActiveMQ
#ENTRYPOINT ["/opt/activemq/apache-activemq-5.14.4/bin/activemq","console"]

#CMD ["-D","FOREGROUND"]
